From 78fca9fd0555fbcd5c57f8897a461e0e122c043f Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 26 Oct 2001 23:37:21 +0000 Subject: [PATCH] Set up destroy signals so that all windows will be destroyed when one is. 2001-10-27 Anders Carlsson * tests/testgtk.c (create_window_states): Set up destroy signals so that all windows will be destroyed when one is. This fixes bug #58133. --- ChangeLog | 3 +++ ChangeLog.pre-2-0 | 3 +++ ChangeLog.pre-2-10 | 3 +++ ChangeLog.pre-2-2 | 3 +++ ChangeLog.pre-2-4 | 3 +++ ChangeLog.pre-2-6 | 3 +++ ChangeLog.pre-2-8 | 3 +++ tests/testgtk.c | 11 +++++++++-- 8 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b3bf1d9e1..dfb3990c4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * tests/testgtk.c (create_range_controls): Don't set a fixed height on the hscale widget. This fixes "bug" #55840. + (create_window_states): Set up destroy signals so that + all windows will be destroyed when one is. This fixes + bug #58133. 2001-10-26 Anders Carlsson diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 0b3bf1d9e1..dfb3990c4b 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -3,6 +3,9 @@ * tests/testgtk.c (create_range_controls): Don't set a fixed height on the hscale widget. This fixes "bug" #55840. + (create_window_states): Set up destroy signals so that + all windows will be destroyed when one is. This fixes + bug #58133. 2001-10-26 Anders Carlsson diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0b3bf1d9e1..dfb3990c4b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -3,6 +3,9 @@ * tests/testgtk.c (create_range_controls): Don't set a fixed height on the hscale widget. This fixes "bug" #55840. + (create_window_states): Set up destroy signals so that + all windows will be destroyed when one is. This fixes + bug #58133. 2001-10-26 Anders Carlsson diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 0b3bf1d9e1..dfb3990c4b 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -3,6 +3,9 @@ * tests/testgtk.c (create_range_controls): Don't set a fixed height on the hscale widget. This fixes "bug" #55840. + (create_window_states): Set up destroy signals so that + all windows will be destroyed when one is. This fixes + bug #58133. 2001-10-26 Anders Carlsson diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0b3bf1d9e1..dfb3990c4b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -3,6 +3,9 @@ * tests/testgtk.c (create_range_controls): Don't set a fixed height on the hscale widget. This fixes "bug" #55840. + (create_window_states): Set up destroy signals so that + all windows will be destroyed when one is. This fixes + bug #58133. 2001-10-26 Anders Carlsson diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0b3bf1d9e1..dfb3990c4b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -3,6 +3,9 @@ * tests/testgtk.c (create_range_controls): Don't set a fixed height on the hscale widget. This fixes "bug" #55840. + (create_window_states): Set up destroy signals so that + all windows will be destroyed when one is. This fixes + bug #58133. 2001-10-26 Anders Carlsson diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0b3bf1d9e1..dfb3990c4b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -3,6 +3,9 @@ * tests/testgtk.c (create_range_controls): Don't set a fixed height on the hscale widget. This fixes "bug" #55840. + (create_window_states): Set up destroy signals so that + all windows will be destroyed when one is. This fixes + bug #58133. 2001-10-26 Anders Carlsson diff --git a/tests/testgtk.c b/tests/testgtk.c index 21925a88e6..b5f42ebe08 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -7964,12 +7964,12 @@ tracking_label (GtkWidget *window) GtkWidget *button; hbox = gtk_hbox_new (FALSE, 5); - + gtk_signal_connect_object (GTK_OBJECT (hbox), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); - + label = gtk_label_new (""); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); @@ -8091,12 +8091,19 @@ create_window_states (void) gtk_container_add (GTK_CONTAINER (window), box1); iconified = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_signal_connect_object (GTK_OBJECT (iconified), "destroy", + GTK_SIGNAL_FUNC(gtk_widget_destroy), + GTK_OBJECT (window)); gtk_window_iconify (GTK_WINDOW (iconified)); gtk_window_set_title (GTK_WINDOW (iconified), "Iconified initially"); controls = get_state_controls (iconified); gtk_container_add (GTK_CONTAINER (iconified), controls); normal = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_signal_connect_object (GTK_OBJECT (normal), "destroy", + GTK_SIGNAL_FUNC(gtk_widget_destroy), + GTK_OBJECT (window)); + gtk_window_set_title (GTK_WINDOW (normal), "Deiconified initially"); controls = get_state_controls (normal); gtk_container_add (GTK_CONTAINER (normal), controls); -- 2.30.2